<template>
  <div id="putScan">
    <div class="head">
      <img :src="'back.png' | imagePath" class="head-back">
      <p>入库</p>
      <span></span>
    </div>
    <div class="putScan">
      <p class="putScan-title">对准二维码到框内即可扫描</p>
      <div class="putScan-box">
        <img :src="'scanBorder.png' | imagePath" />
      </div>
    </div>
    <!-- 弹框 -->
    <div class="upBox">
      <div class="putScan-up">
        <div class="putScan-up-title">{{isSuccess ? '入库成功!' : '入库失败!'}}</div>
        <img :class="isSuccess ? '' : 'isFail'" :src="isSuccess ? 'successIcon.png' : 'failIcon.png' | imagePath"/>
        <p v-if="!isSuccess">您无权入库该电池</p>
        <button @click="$.router.push('putScanModel')">我知道了</button>
      </div>
    </div>
  </div>
</template>

<script>
  export default{
    data(){
      return{
        isSuccess:false
      }
    }
  }
</script>
<style>
  #putScan{
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
  }
  .putScan{
    margin-top: 2.66rem;
  }
  .putScan-title{
    color: #FFFFFF;
    text-align: center;
    font-size: 0.4rem;
    margin-bottom: 0.46rem;
  }
  .putScan-box{
    width: 6.32rem;
    height: 6.32rem;
    background: #000000 url(../../assets/images/scanBox.png) no-repeat;
    background-size: 100% 100%;
    margin: auto;
    position: relative;
  }
  .putScan-box img{
    position: absolute;
    width: 4.66rem;
    height: 0.12rem;
    display: block;
    margin: auto;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }
  .putScan-up{
    background-color: #FFFFFF;
    width: 7.46rem;
    border-radius: 0.2rem;
  }
  .putScan-up-title{
    margin: 0.72rem 0;
    text-align: center;
    font-size: 0.53rem;
  }
  .putScan-up img{
    display: block;
    width: 3.1rem;
    height: 1.76rem;
    margin: auto;
  }
  .putScan-up img.isFail{
    width: 2.32rem;
    height: 2rem;
  }
  .putScan-up p{
    color: #9A9A9A;
    font-size: 0.38rem;
    text-align: center;
    margin-top: 0.77rem;
  }
  .putScan-up button{
    background-color:#6EC5C6 ;
    color: #FFFFFF;
    width: 4.22rem;
    border-radius: 0.66rem;
    font-size: 0.48rem;
    padding: 0.21rem 0;
    display: block;
    margin:0.77rem auto;
  }
</style>
